package edu.ahut.corejava3;

import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

/**
 * 从键盘上输入若干个数（个数不确定），对这些数去重和排序
 */
public class UniqueSortNumbers02 {
    public static void main(String[] args) {
        //Set<Integer> a=new HashSet<Integer>();//O(1)
        Set<Integer> a = new TreeSet<Integer>();//O(lb N)//log ln lb
        while (cin.hasNext()) {
            a.add(cin.nextInt());
        }
        System.out.println(a);

    }

    static Scanner cin = new Scanner(System.in);
}
